<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    238. Product of Array Except Self
   </h1>
   <p>
    Given an array
    <code>
     nums
    </code>
    of
    <em>
     n
    </em>
    integers where
    <em>
     n
    </em>
    &gt; 1, &nbsp;return an array
    <code>
     output
    </code>
    such that
    <code>
     output[i]
    </code>
    is equal to the product of all the elements of
    <code>
     nums
    </code>
    except
    <code>
     nums[i]
    </code>
    .
   </p>
   <p>
    <b>
     Example:
    </b>
   </p>
   <pre>
<b>Input:</b>  <code>[1,2,3,4]</code>
<b>Output:</b> <code>[24,12,8,6]</code>
</pre>
   <p>
    <strong>
     Note:
    </strong>
    Please solve it
    <strong>
     without division
    </strong>
    and in O(
    <em>
     n
    </em>
    ).
   </p>
   <p>
    <strong>
     Follow up:
    </strong>
    <br>
    Could you solve it with constant space complexity? (The output array
    <strong>
     does not
    </strong>
    count as extra space for the purpose of space complexity analysis.)
   </p>
  </div>
  <div>
   <h1 class="question_title">
    238. 除自身以外数组的乘积
   </h1>
   <p>
    给定长度为&nbsp;
    <em>
     n
    </em>
    &nbsp;的整数数组&nbsp;
    <code>
     nums
    </code>
    ，其中&nbsp;
    <em>
     n
    </em>
    &gt; 1，返回输出数组&nbsp;
    <code>
     output
    </code>
    &nbsp;，其中
    <code>
     output[i]
    </code>
    &nbsp;等于&nbsp;
    <code>
     nums
    </code>
    &nbsp;中除&nbsp;
    <code>
     nums[i]
    </code>
    &nbsp;之外其余各元素的乘积。
   </p>
   <p>
    <strong>
     示例:
    </strong>
   </p>
   <pre><strong>输入:</strong> <code>[1,2,3,4]</code>
<strong>输出:</strong> <code>[24,12,8,6]</code></pre>
   <p>
    <strong>
     说明:
    </strong>
    请
    <strong>
     不要使用除法，
    </strong>
    且在&nbsp;O(
    <em>
     n
    </em>
    ) 时间复杂度内完成此题。
   </p>
   <p>
    <strong>
     进阶：
    </strong>
    <br>
    你可以在常数空间复杂度内完成这个题目吗？（ 出于对空间复杂度分析的目的，输出数组
    <strong>
     不被视为
    </strong>
    额外空间。）
   </p>
  </div>
 </body>
</html>